<style>
.mix {padding:0px 5px;}
</style>
		<div class="ui-portlet">
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;个人中心</a></li>
			  <li class="active">活动列表</li>
			</ol>
		</div>
       <hr>
       <div class="mb10">
       	<a class="btn btn-primary" href="{{$this->Html->url(array('action'=>'add'))}}">新增活动</a>
       	
       </div>
       <br/>
       <div>

	       <ul class="nav nav-tabs" role="tablist">
	       	<li {{if !$_REQUEST['city_id']}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array(),array('cate_id'))}}">{{__('All')}}</a></li>
	       	
	       			<li {{if $_REQUEST['cate_id']==1}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('cate_id'=>1),array('cate_id'))}}">投票</a></li>

	       			<li {{if $_REQUEST['cate_id']==2}}class="active"{{/if}}><a href="{{getSearchLinks($this->request,array('cate_id'=>2),array('cate_id'))}}">报名</a></li>
	       </ul>
       </div>
       
       <div class="ui-portlet">
	       <div class="row clearfix ui-portlet-list" id="storefront-list">
	       {{loop $datalist $item}}
	       	<div class="col-md-4 mix">
	       		<div class="appmsg">
		       		<div class="appmsg_content">
		       		<h4><a href="{{$this->Html->url('/wx_activities/view/'.$item['WxActivity']['id'])}}" target="_blank">{{$item['WxActivity']['name']}}</a></h4>
		       		{{if $item['WxActivity']['coverimg']}}
		       		<div class="cover">{{$this->Html->image($item['WxActivity']['coverimg'])}}</div>
		       		{{/if}}
		       		<p>{{substr($item['WxActivity']['started'],0,16)}} ~ {{substr($item['WxActivity']['ended'],0,16)}}</p>
		       		
		       		<div style="margin-bottom:5px;">
		       			{{if $item['WxActivity']['model'] == 'WxVote'}}
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Add Vote').'" class="fa fa-plus"></i> 新增投票项', array('controller'=>'wx_votes','action' => 'add', '?'=>array('aid'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
			       			&nbsp;
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Vote List').'" class="fa fa-list"></i> 查看投票项', array('controller'=>'wx_votes','action' => 'mine', '?'=>array('activity_id'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
		       			{{elseif $item['WxActivity']['model'] == 'Qa'}}
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Add Vote').'" class="fa fa-plus"></i> 新增提问', array('controller'=>'qas','action' => 'add', '?'=>array('aid'=>$item['WxActivity']['id'])),array('class'=>'btn btn-primary','escape'=>false))}}
			       			&nbsp;
			       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Vote List').'" class="fa fa-list"></i> 查看已有提问', array('controller'=>'qas','action' => 'mine', '?'=>array('data_id'=>$item['WxActivity']['id'],'model'=>'Qa')),array('class'=>'btn btn-primary','escape'=>false))}}
			       			
		       			{{/if}}
		       		</div>
		       			
		       			
		       		</div>
		       		<div class="appmsg_opr clearfix">
		       			{{$this->Html->link('<i data-toggle="tooltip" data-placement="top" title="'.__('Edit').'" class="fa fa-edit"></i>', array('controller'=>'wx_activities','action' => 'edit', $item['WxActivity']['id']),array('class'=>'col-xs-6 opr-edit','escape'=>false))}}
		       			
		       			
		       			<a href="javascript:void(0)" data-url="{{$this->Html->url('/wx_activities/delete/'.$item['WxActivity']['id'])}}" class="col-xs-6 delete-pop" data-placement="bottom" data-content="确定删除此素材？"><i data-toggle="tooltip" data-placement="top" 
		       			 title="{{__('Delete')}}" class="fa fa-trash"></i></a>
		       			 
		       			 <!-- {{$this->Html->link('', array('controller'=>'wx_msgs','action' => 'delete', $item['WxActivity']['id']),array('class'=>'col-xs-6','escape'=>false))}}
		       			  -->
		       		</div>
	       		</div>
	       	</div>
	  		{{/loop}}
	    	</div>
	    	<div>{{$page_navi}}</div>
    	</div>